package com.aki.ai_property.controller;

import com.aki.ai_property.dto.RentingDto;
import com.aki.ai_property.service.intf.RentingDtoService;
import com.aki.ai_property.vo.PageBean;
import com.aki.ai_property.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Author:WuChuangChuang
 * Date:2022/9/1 23:27
 */
@RestController
@RequestMapping("/api/rentingdto")
public class RentingDtoController {
    @Autowired
    private RentingDtoService service;


    @PostMapping("/save.do")
    public Result save(RentingDto rentingDto){
        return service.save(rentingDto);
    }

    @GetMapping("/all.do")
    public PageBean all(String houseType,int page,int limit){
        return service.all(houseType, page, limit);
    }
}
